import request from '@/utils/request'

export function fetchTool(data) {
    return request({
        url: '/system/tool/list',
        method: 'get',
        params: data
    })
}

export function info(id) {
    return request({
        url: '/system/tool/info',
        method: 'get',
        params: {
            id: id
        }
    })
}

export function save(data) {
    return request({
        url: '/system/tool/add',
        method: 'post',
        data
    })
}

export function update(data) {
    return request({
        url: '/system/tool/update',
        method: 'post',
        data
    })
}

export function top(data) {
    return request({
        url: '/system/tool/top',
        method: 'post',
        data
    })
}

export function pubOrShelf(data) {
    return request({
        url: '/system/tool/publish',
        method: 'post',
        data
    })
}

export function remove(id) {
    return request({
        url: '/system/tool/delete',
        method: 'delete',
        params: {
            id: id
        }
    })
}

export function deleteBatch(data) {
    return request({
        url: '/system/tool/deleteBatch',
        method: 'delete',
        data
    })
}
